#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Generic;
namespace Cephei.QL.Math
{
     // <summary> 
	// ! Follows treatment and notation from:  Weisstein, Eric W. "B-Spline." From MathWorld--A Wolfram Web Resource.  <http://mathworld.wolfram.com/B-Spline.html>  \f$ (p+1) \f$-th order B-spline (or p degree polynomial) basis functions \f$ N_{i,p}(x), i = 0,1,2 \ldots n \f$, with \f$ n+1 \f$ control points, or equivalently, an associated knot vector of size \f$ p+n+2 \f$ defined at the increasingly sorted points \f$ (x_0, x_1 \ldots x_{n+p+1}) \f$. A linear B-spline has \f$ p=1 \f$, quadratic B-spline has \f$ p=2 \f$, a cubic B-spline has \f$ p=3 \f$, etc.  The B-spline basis functions are defined recursively as follows:  \f[ \begin{array}{rcl} N_{i,0}(x) &=& 1   \textrm{\ if\ } x_{i} \leq x < x_{i+1} \\ &=& 0   \textrm{\ otherwise} \\ N_{i,p}(x) &=& N_{i,p-1}(x) \frac{(x - x_{i})}{ (x_{i+p-1} - x_{i})} + N_{i+1,p-1}(x) \frac{(x_{i+p} - x)}{(x_{i+p} - x_{i+1})} \end{array} \f]
	// </summary>
    [Guid ("70FC6998-0617-43a5-A6F2-1B5C30934333"),ComVisible(true)]
	public interface IBSpline 
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
    }

    // <summary> 
	// ! Follows treatment and notation from:  Weisstein, Eric W. "B-Spline." From MathWorld--A Wolfram Web Resource.  <http://mathworld.wolfram.com/B-Spline.html>  \f$ (p+1) \f$-th order B-spline (or p degree polynomial) basis functions \f$ N_{i,p}(x), i = 0,1,2 \ldots n \f$, with \f$ n+1 \f$ control points, or equivalently, an associated knot vector of size \f$ p+n+2 \f$ defined at the increasingly sorted points \f$ (x_0, x_1 \ldots x_{n+p+1}) \f$. A linear B-spline has \f$ p=1 \f$, quadratic B-spline has \f$ p=2 \f$, a cubic B-spline has \f$ p=3 \f$, etc.  The B-spline basis functions are defined recursively as follows:  \f[ \begin{array}{rcl} N_{i,0}(x) &=& 1   \textrm{\ if\ } x_{i} \leq x < x_{i+1} \\ &=& 0   \textrm{\ otherwise} \\ N_{i,p}(x) &=& N_{i,p-1}(x) \frac{(x - x_{i})}{ (x_{i+p-1} - x_{i})} + N_{i+1,p-1}(x) \frac{(x_{i+p} - x)}{(x_{i+p} - x_{i+1})} \end{array} \f] Factory
	// </summary>
   	[ComVisible(true)]
    public interface IBSpline_Factory // : Collection_Factory<IBSpline, ICell<IBSpline>>
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
        
	    IBSpline Create (UInt32 p, UInt32 n, Cephei.IVector<Double> knots);
    }
}

